package com.stenio.fancat.service.enums;

/**
 * @author zhangqiu
 * @date 2018/12/1
 * @desc
 **/
public enum  ImageType {
    WARE(1,"商品图片"),
    WARE_MAN(2,"商品运营图片"),
    WARE_FLEA(3,"二手商品图片"),
    WARE_FLEA_MAN(4,"二手商品运营图片"),
    VENDER_CODE(5,"商家二维码图片");

    private int type;
    private String desc;

    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    ImageType(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static ImageType getEnumByType(int type){
        for(ImageType e:ImageType.values()){
            if(e.getType()==type){
                return e;
            }
        }
        return null;
    }
}
